package com.aaa.controller;
import com.aaa.entity.Fsite;
import com.aaa.entity.ResultMsg;
import com.aaa.service.impl.FsiteServiceImpl;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("site")
public class FsiteController {
    @Resource
    FsiteServiceImpl fsiteService;
    @RequestMapping("find")
    public ResultMsg find(Integer f_user){
        return ResultMsg.success(fsiteService.find(f_user));
    }
    @RequestMapping("del")//删除地址
    public ResultMsg del(Integer id){
        return ResultMsg.success(fsiteService.removeById(id));
    }
    @RequestMapping("add")
    public ResultMsg add(Fsite fsite){
        return ResultMsg.success(fsiteService.saveOrUpdate(fsite));
    }
}
